package chapter_22_state.classic.state;

import chapter_22_state.classic.context.Context;

/**
 * Created by yao on 2016/10/11.
 * 具体状态类B
 */
public class ConcreateState2 extends State {

    @Override
    public void handle1(String param) {
        //将状态设置为state1
        super.context.setCurrentState(Context.STATE1);

        //过度到state1,由context实现
        super.context.handle1(param);
    }

    @Override
    public void handle2(String param) {
        System.out.println("ConcreateState2处理:"+param);
    }

}
